How can I get current controller and current controller action name in yii2

123

<?php echo Yii::$app->controller->id; //current controller id ?>


<?php echo Yii::$app->controller->action->id; //current controller action id ?>

Comments

Submit
0 Comments